package com.xsprite.managesys.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.zhangzhang.struts.action.ActionManager;

/**
 * Servlet implementation class WebDispatcherServlet
 */
public class WebDispatcherServlet extends BaseServlet {
	private static final long serialVersionUID = 1L;

	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		super.service(req, resp);
		try{
			String action = queryParam("action");
			ActionManager.getInstance().act(action, req, resp);
		} catch (Exception ex){
			ex.printStackTrace();
		}
	}
}